import request from '@/utils/request'
const baseUrl = '/cz-rentbox/api/v1/feeBusiness' // 业务费管理

// http://47.122.3.254:9999/cz-system/api/v1

/*
 列表
# POST {{baseUrl}}/page
*/
export const getTableList = (data: any) => {
  return request({
    url: baseUrl + '/page',
    method: 'POST',
    data:data
  })
}
// 添加线下
export const insertManualFeeBusinessDetails = (data: any) => {
    return request({
      url: baseUrl + '/insertManualFeeBusinessDetails',
      method: 'POST',
      data:data
    })
  }
// 新增费用业务明细
export const addFeeBusinessDetails = (data: any) => {
  return request({
    url: baseUrl + '/addFeeBusinessDetails',
    method: 'POST',
    data:data
  })
}
//查询
export const getDetaiId = (id: any) => {
  return request({
    url: baseUrl + '/' + id,
    method: 'GET'
  })
}
// 批量编辑
export const updateFeeBusinessDetailsByIds = (data: any) => {
  return request({
    url: baseUrl + '/updateFeeBusinessDetailsByIds',
    method: 'PUT',
    data:data
  })
}
//批量删除
export const deleteIds = (ids: any) => {
  return request({
    url: baseUrl,
    method: 'DELETE',
    data:ids
  })
}
// 查询业务信息，费用明细List
export const selectFeeBusinessDetails = (data: any) => {
    return request({
      url: baseUrl + '/selectFeeBusinessDetails',
      method: 'POST',
      data:data
    })
  }
  // 编辑费用业务明细
export const updateFeeBusinessDetailsByRefId = (data: any) => {
    return request({
      url: baseUrl + '/updateFeeBusinessDetailsByRefId',
      method: 'PUT',
      data:data
    })
  }
  // 查询单票利润
export const selectFeeBusinessProfit = (data: any) => {
  return request({
    url: baseUrl + '/selectFeeBusinessProfit',
    method: 'POST',
    data:data
  })
}